package com.chj.service;

import com.chj.dao.OrderEntityMapper;
import com.chj.entity.OrderEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Slf4j
public class OrderService {

    @Autowired
    private OrderEntityMapper orderMapper;


    @Transactional
    public long addOne1(OrderEntity entity) {
        this.orderMapper.insert(entity);
        return entity.getId();
    }
}
